#ifndef FINANCIALWIDGET_H
#define FINANCIALWIDGET_H

#include <QWidget>

class QChartView;
class QTableWidget;
class QDateEdit;
class QComboBox;
class QPushButton;

namespace Ui {
class FinancialWidget;
}

class FinancialWidget : public QWidget
{
    Q_OBJECT

public:
    explicit FinancialWidget(QWidget *parent = nullptr);
    ~FinancialWidget();
private:
    void setupUI();
    void loadFinancialRecords();
    void populatestudentComboBox();
    void addRecord();
    void updateChart();//更新下方折线图
    void updatePieChart();//更新右侧饼图
    void deleteRecord();
    void editRecord();


    QChartView *pieChartView;
    QTableWidget *tableWidget;
    QComboBox *studentComboBox;
    QPushButton *addButton;
    QPushButton *deleteButton;
    QPushButton *editButton;
    QChartView *chartView;
    QDateEdit *startDateEdit;
    QDateEdit *endDateEdit;

private:
    Ui::FinancialWidget *ui;
};

#endif // FINANCIALWIDGET_H
